package cn.com.io.day20151214.pojo;

import java.io.Serializable;

/**
 * Created by Administrator on 2015/12/12.
 */
public class Orientation implements Serializable{
    public static final Orientation HORIZONTAL = new Orientation(1);
    public static final Orientation VERTICAL = new Orientation(2);

    private int value;
    private Orientation(int value){
        this.value=value;
    }

    private Object readResolve(){
        if (value==1){
            return HORIZONTAL;
        }
        if(value==2){
            return VERTICAL;
        }
        return null;
    }



}
